package com.df.tank.designPattern.singleton;

/**
 * 懒汉式-静态内部类
 * 加载外部类时不会加载内部类
 */
public class Singleton05 {
    private Singleton05() {
    }

    public static Singleton05 getInstance() {
        return Inner.instance;
    }

    private static class Inner {
        private static final Singleton05 instance = new Singleton05();
    }

    public static void main(String[] args) {

    }
}
